<template>
  <div class="serch">
    <el-input v-model="keyWord"  :placeholder="placeholder" @change="search"></el-input>
  </div>
</template>

<script>
import Vue from "vue";
import {
  Input,
} from "element-ui";
Vue.use(Input);
export default {
  props:{
      placeholder: {
          type: String,
          default: '请输入关键字'
      },
      serchdata: Function
  },
  data () {
    return {
      keyWord:''
    }
  },
  methods: {
    // 筛选数组，以及input事件
    search () {
      console.log(this.keyWord)
      this.$emit('searchData', this.keyWord)
    },
  }
}
</script>

<style lang="scss" scoped>

</style>
